/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mainApp;

import java.util.ArrayList;

/**
 *
 * @author Picto
 */
public class Data {

    private ArrayList<Character> lettersAttempted = new ArrayList<Character>();
    private ArrayList<Character> wordComparisonArray = new ArrayList<Character>();
    private ArrayList<Character> wordArray = new ArrayList<Character>();
    private ArrayList<HighScore> highScores = new ArrayList<HighScore>();
    private Word word;
    private int score;
    private int attempts;
    private HighScore highScore;
    private boolean guessedCorrectly;
    private boolean continuePlay;
    private boolean isGUI;

    public void clearAllData() {
        lettersAttempted = new ArrayList<Character>();
        wordComparisonArray = new ArrayList<Character>();
        wordArray = new ArrayList<Character>();
        highScores = new ArrayList<HighScore>();
        word.getNewWord();
        attempts = 0;
        guessedCorrectly = false;
        continuePlay = true;
    }

    /**
     * @return the lettersAttempted
     */
    public ArrayList<Character> getLettersAttempted() {
        return lettersAttempted;
    }

    /**
     * @param lettersAttempted the lettersAttempted to set
     */
    public void setLettersAttempted(ArrayList<Character> lettersAttempted) {
        this.lettersAttempted = lettersAttempted;
    }

    /**
     * @return the wordArray
     */
    public ArrayList<Character> getWordArray() {
        return wordArray;
    }

    /**
     * @param wordArray the wordArray to set
     */
    public void setWordArray(ArrayList<Character> wordArray) {
        this.wordArray = wordArray;
    }

    /**
     * @return the highScores
     */
    public ArrayList<HighScore> getHighScores() {
        return highScores;
    }

    /**
     * @param highScores the highScores to set
     */
    public void setHighScores(ArrayList<HighScore> highScores) {
        this.highScores = highScores;
    }

    /**
     * @return the word
     */
    public Word getWord() {
        return word;
    }

    /**
     * @param word the word to set
     */
    public void setWord(Word word) {
        this.word = word;
    }

    /**
     * @return the score
     */
    public int getScore() {
        return score;
    }

    /**
     * @param score the score to set
     */
    public void setScore(int score) {
        this.score = score;
    }

    /**
     * @return the attempts
     */
    public int getAttempts() {
        return attempts;
    }

    /**
     * @param attempts the attempts to set
     */
    public void setAttempts(int attempts) {
        this.attempts = attempts;
    }

    /**
     * @return the highScore
     */
    public HighScore getHighScore() {
        return highScore;
    }

    /**
     * @param highScore the highScore to set
     */
    public void setHighScore(HighScore highScore) {
        this.highScore = highScore;
    }

    /**
     * @return the guessedCorrectly
     */
    public boolean isGuessedCorrectly() {
        return guessedCorrectly;
    }

    /**
     * @param guessedCorrectly the guessedCorrectly to set
     */
    public void setGuessedCorrectly(boolean guessedCorrectly) {
        this.guessedCorrectly = guessedCorrectly;
    }

    /**
     * @return the continuePlay
     */
    public boolean isContinuePlay() {
        return continuePlay;
    }

    /**
     * @param continuePlay the continuePlay to set
     */
    public void setContinuePlay(boolean continuePlay) {
        this.continuePlay = continuePlay;
    }

    public void incrementScore(int increment) {
        score += increment;
    }

    public void incrementAttempt() {
        attempts++;
    }

    public void incrementAttemptWord() {
        attempts += 5;
    }

    public void addAttemptedLetter(char letter) {
        lettersAttempted.add(letter);
    }

    /**
     * @return the wordComparisonArray
     */
    public ArrayList<Character> getWordComparisonArray() {
        return wordComparisonArray;
    }

    /**
     * @param wordComparisonArray the wordComparisonArray to set
     */
    public void setWordComparisonArray(ArrayList<Character> wordComparisonArray) {
        this.wordComparisonArray = wordComparisonArray;
    }

    public void setInWordComparisonArray(int position, char letter) {
        wordComparisonArray.set(position, letter);
    }

    public void addInWordComparisonArray(char letter) {
        wordComparisonArray.add(letter);
    }

    public void addInWordArray(char letter) {
        wordArray.add(letter);
    }

    /**
     * @return the isGUI
     */
    public boolean isIsGUI() {
        return isGUI;
    }

    /**
     * @param isGUI the isGUI to set
     */
    public void setIsGUI(boolean isGUI) {
        this.isGUI = isGUI;
    }
}
